package com.duan.controller;

import com.duan.anno.Log;
import com.duan.pojo.Result;
import com.duan.pojo.User;
import com.duan.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author db
 * @version 1.0
 * @description UserController
 * @since 2024/4/15
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/addUser")
    @Log
    public Result addUser(@RequestBody User user){
        userService.AddUser(user);
        return Result.success();
    }
}
